The present invention relates in general to improving the quality of printing press output by hiding unwanted gaps between different colored areas on a printed output page. More particularly, the present invention relates to automatically calculating minimal traps for each page object in a publication in a native desktop publishing application, prior to converting the publication to a page description language.
Printing presses are used to generate large volumes of high-quality printed output pages. Most printing presses that generate multiple-color output do so by laying down on a printed output page one color of ink at a time, in a multi-pass process. Two types of color jobs that may be run on such printing presses are: process color printing and spot color printing. Process color printing involves four primary ink colors: cyan, magenta, yellow and black. These four primary ink colors are commonly referred to by their initials CMY and K. Cyan, magenta and yellow are subtractive primary ink colors and may be combined to form most other ink colors. Spot color printing involves application of solid areas of a pre-mixed ink rather than overlapping four inks (CMY and K) to create colors. A spot color ink is a specific color, such as a bright orange or a purple, that is laid down on the printed output page in a single pass. Process color printing and spot color printing may be combined, using CMY and K inks along with one or more spot color inks.
As a printed output page moves through a printing press, different colored inks for the printing job are laid down in successive passes. Each ink color is applied by what is commonly called a color plate. Conceptually, each page object of the publication is printed on the printed output page in a back-to-front order. If a page object contains a percentage greater than zero of the ink color corresponding to the current color plate, that object is rendered in that percentage of color on the printed output page. If a page object contains zero percent of the ink color of the current color plate, a white area in the shape of that page object is generated on the printed output page. Generation of a white area in the shape of a page object is called a xe2x80x9cknocking outxe2x80x9d a color, or rendering a xe2x80x9cknockoutxe2x80x9d of the page object. As the printed output page moves through the printing press, the succession of rendering and knocking out colors of the page objects of the publication for each ink color produces the final printed output. Those skilled in the art will recognize that the physical printing process is somewhat different from the above conceptual description, but that the net effect is equivalent.
Certain factors may cause defects to appear in the printed output pages generated by a printing press. For example, liquid inks may be absorbed, to some degree, into the printed output page and may cause the paper to stretch and deform slightly. Also, because the printed output page moves through the press at high speeds, it may bounce when it is stopped to have an ink color pressed onto it. The effect of these and other factors may be slight variances in the alignment of the various ink colors. Such variances are commonly referred to as misregistration errors. Misregistration errors result in gaps between areas of different color, or areas where one process color ink appears to be out of alignment with others process color inks. One solution to the problem of misregistration errors is known as xe2x80x9ctrapping.xe2x80x9d
Trapping does not prevent misregistration errors. Instead, trapping is a procedure that aims to reduce the visibility of misregistration errors. Assuming that limitations of current ink, paper and printing press technologies cannot be removed, trapping provides an effective stopgap solution for hiding misregistration errors on printed output pages. Through analysis of all page objects in a publication, it is possible to determine which ink colors will end up being adjacent to one another on the final printed output pages. Existing trapping heuristics may be used to determine which color combinations, when adjacent to one another, are likely to cause visible misregistration errors.
Trapping is the name given to the process of identifying adjacent color pairs that are likely to cause misregistration errors and hiding the misregistration errors by laying down an extra strip of ink, of a calculated color and width, to cover any gap or misalignment that may occur. Physically, an extra strip of ink only affects the color plate on which it is placed. In other words, an extra strip of ink enlarges the area of color on a particular color plate without causing a knockout of additional white space on other color plates. Accordingly, when the different color plates are composited onto the final printed output page, the extra ink strip covers any gap or misalignment that will occur due to misregistration.
Prior to the invention of the personal computer, trapping was performed manually, by creating hand-doctored images of the printed output pages. The advent of the personal computer and desktop publishing (DTP) software gave rise to the possibility of automatic trapping solutions. Prior art DTP applications typically perform trapping by performing a post-processing step on an output file, such as a PostScript file. Also, prior art DTP applications are not operable to perform trapping with a high level of accuracy.
Certain prior art-high-end trapping applications are capable of trapping with a high level of accuracy, i.e., performing multiple types of trapping along the length of a page object. However, these high-end applications also typically operate on page data in a post-processing manner. That is, high-end trapping applications typically accept as input the page data generated by a DTP application after it has been converted to an intermediate format, such as PostScript or some other proprietary page description language. Post-processing is an expensive and time consuming effort.
Thus, there remains a need for a desktop publishing application that is operable to perform trapping of page objects in the native application, so as to avoid the need for post-processing.
There further remains a need for a desktop publishing application that is operable to perform trapping of page objects in the native application using precise position and color information,
The present invention meets the above-described needs by providing a desktop publishing (DTP) application program with functionality for automatically generating minimal traps for each page object in the native DTP application program, prior to converting a publication to a page description language. The present invention may leverage and/or build upon the existing functionality of a DTP application program.
In one embodiment, a desktop publishing application program is configured to generate minimal traps for a publication comprising a first page object, a second page object and a third page object. In the exemplary publication, the second page object has a higher Z-order than the first page object and the third page object has a lower Z-order than the first page object. The present invention traps the first page object against the second page object and the third page object by decomposing the first page object into one or more first page object components; self-trapping the first page object components against each other to create one or more trap segments to be added to a trap output list; creating a first trap source list comprising one or more first trap candidate segments from the first page object components, the first trap candidate segments comprising exposed edges of the first page object components that intersect or abut the second page object or the third page object; adjacency trapping the first trap candidate segments against the second page object to remove portions of the first trap candidate segments from the first trap source list; adjacency trapping the first trap candidate segments against the third page object to remove portions of the first trap candidate segments from the first trap source list and to add additional trap segments to the trap output list; general-purpose trapping the first trap candidate segments against the second page object to remove portions of the first trap candidate segments from the first trap source list and to add further trap segments to the trap output list; and rendering the trap segments of the trap output list onto appropriate color plates.
According to one embodiment of the present invention, adjacency trapping a first trap candidate segments against a second page object having a lower Z-order than the first page object involves: detecting whether a potential adjacency trapping situation exists between the first trap candidate segment and the second page object; in response to detecting the potential adjacency trapping situation, performing adjacency trapping between the first trap candidate segment and the second page object to create a trap segment and to remove from the first trap source list any portion of the first trap candidate segment that maps to the trap segment; and performing a color test to determine whether the trap segment is to be added to a trap output list or deleted.
In an exemplary embodiment, detecting a potential adjacency trapping situation involves: determining that the second page object abuts the first page object; decomposing the second page object into second page object components to create a second trap source list comprising second trap candidate segments; comparing the first trap candidate segment to each second trap candidate segment in the second trap source list according to the following steps: (1) comparing the rotation states of the first trap candidate segment and the second trap candidate segment, (2) if the rotation states are equivalent, determining whether the first trap candidate segment and the second trap candidate segment are separated by less than a maximum adjacency trapping distance, (3) if the first trap candidate segment and the second trap candidate segment are separated by less than a maximum adjacency trapping distance, determining whether the first trap candidate segment overlaps the second trap candidate segment in the direction corresponding to the rotation states, (4) if the first trap candidate segment overlaps the second trap candidate segment in the direction corresponding to the rotation states, determining whether the shared extent of the first trap candidate segment and the second trap candidate segment is greater than a predetermined length, and (5) if the shared extent of the first trap candidate segment and the second trap candidate segment is greater than a predetermined length, determining whether respective segment normal vectors for the first trap candidate segment and the second trap candidate segment point in opposite directions, whereby a potential adjacency trapping situation exists if it is determined that the respective segment normal vectors for the first trap candidate segment and the second trap candidate segment point in opposite directions. An exemplary method for adjacency trapping involves: creating a trap segment along the shared extent of the first trap candidate segment and the second trap candidate segment; comparing the trap segment to the first trap candidate segment; and removing from the first trap source list any portion of the first trap candidate segment that maps to the trap segment.
According to an exemplary embodiment of the present invention, general-purpose trapping involves: detecting whether a potential general-purpose trapping situation exists between the first trap candidate segment and the second page object; in response to detecting the potential general-purpose trapping situation, performing general-purpose trapping between is the first trap candidate segment and the second page object to create a next trap segment and to remove from the first trap source list any portion of the first trap candidate segment that overlays the second page object; in response to creating the next trap segment, performing a color test to determine whether the next trap segment is to be added to the trap output list or deleted; and rendering the trap segments from the trap output list onto appropriate color plates to hide misregistration errors between the first page object and the second page object.
An exemplary method for detecting whether a potential general-purpose trapping situation exists involves decomposing the second page object into second page object components to create a second trap source list comprising second trap candidate segments and determining whether the first trap candidate segment intersects any of the second trap candidate segments. An exemplary method for performing general-purpose trapping between the first trap candidate segment and the second page object involves: generating the next trap segment having a length equal to the extent of the intersection between the first trap candidate and the second trap candidate segment; and removing from the first trap source list any portion of the first trap candidate segment overlays the second page object component associated with the second trap candidate segment.
According to another aspect of the present invention, text contained within a text-containing page object is also trapped against other page objects in a publication. If the text-containing page object is opaque, the text therein may be trapped against the background of the text-containing page object. If the text-containing page object is transparent, the text therein may be trapped against page objects beneath the text-containing page object.
In an exemplary embodiment, trapping text contained in an opaque text containing page object against the background of the text containing page object involves: determining the color of the text; determining the background color of the first page object; performing a color calculation on the background color of the first page object and the color of the text to determine that trapping between the text and the first page object is appropriate; using trapping heuristics to calculate a trap width and a trap color; rendering the text on the appropriate color plates as it would appear without trapping; obtaining outline information for each character comprising the text, the outline information defining the outlines of the characters; and rendering the outlines of the characters on appropriate color plates in the trap width and trap color.
In an exemplary embodiment, trapping text contained in a transparent text containing page object against the lower Z-ordered page object involves: determining the color of the text; rendering the text on the appropriate color plates as it would appear without trapping; obtaining outline information for each character comprising the text; converting the outline information into line segments to be stored in a new trap source list; and general-purpose trapping the line segments of the new trap source list against the third page object to create new trap segments to be added to the trap output list.
According to another aspect of the present invention, functionality is provided for performing keepaway trapping on any of trap candidate segments in a trap source list that do not intersect with any other colored page object in the publication. In an exemplary embodiment, keepaway trapping involves: determining if a trap candidate segment is associated with a rich black colored first page object component; and if the trap candidate segment is associated with a rich black colored first page object component, rendering a corresponding thin white segment on all color plates except a black color plate.